home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / inifile3 / readme.tx_ / readme.tx
Encoding:
Text File  |  1996-02-12  |  8.5 KB  |  183 lines

  1. The Galaxy Software INI File  OLE Server DLL allows the developer
  2. to access program initialization files (*.INI) using the standard
  3. object syntax  that all MS Visual  Basic programmers  have become
  4. accustomed to.  This OLE DLL was created with MS Visual Basic 4.0
  5. Professional Edition and has been tested under MS Windows 95.  It
  6. should also function correctly  under MS Windows NT 3.51 although
  7. this capability has not been tested.
  8.     
  9.     Note:   To see a listing of the  required parameters for each
  10.             method and  property please reference  Object Browser
  11.             on the View menu in the Visual Basic IDE interface.
  12.  
  13. =================================================================
  14. Installation:
  15.  
  16. To install  this product on  your computer all  you need to do is
  17. run the setup program.
  18.     1)  In Windows 95 click on the start menu and select run.
  19.     2)  Type X:\Path\Setup.exe or click Browse and find setup.exe
  20.     3)  Click on the OK button.
  21.     
  22. To uninstall this product:
  23.     1)  In Windows 95 click on the start menu and select Settings
  24.     2)  Select the Control Panel option.
  25.     3)  In control panel double click on Add/Remove Programs.
  26.     4)  Select GalaxySoft INI File OLE Server and click remove.
  27.     
  28. =================================================================
  29. The INI File OLE DLL contains the following objects:
  30.  
  31.     Object      Description
  32.     ------      -------------------------------------------------
  33.     INIStr      Allows access to string values.
  34.     INIInt      Allows access to integer values.
  35.     INILng      Allows access to long integer values.
  36.     INISgl      Allows access to floating point single values.
  37.     INIDbl      Allows access to floating point double values.
  38.  
  39. =================================================================
  40. Each of the above objects contain the following methods:
  41.  
  42.     Method              Description
  43.     -----------------   -----------------------------------------
  44.     obj.Register        Registers the object to the specified INI
  45.                         file, section, and key.   Also allows you
  46.                         to specify a default value.
  47.     obj.RemoveKey       Deletes registered key from the INI file.
  48.     obj.RemoveSection   Deletes the  registered  section  and all
  49.                         associated keys from the INI file.
  50.  
  51. =================================================================
  52. Each of the above objects contain the following properties:
  53.  
  54.     Property      Description
  55.     -----------   -----------------------------------------------
  56.     obj.File      Returns the INI file path and filename that was
  57.                   set in the  Register  method.   The return data
  58.                   type is string.  (read-only)
  59.     obj.Section   Returns the section set in the Register method.
  60.                   The return data type is string.  (read-only)
  61.     obj.Key       Returns  the key  set in the  Register  method.
  62.                   The return data type is string.  (read-only)
  63.     obj.Default   Returns the  default value  set in the Register
  64.                   method.  The return data  type is determined by
  65.                   the  object type.   Ex: INIDbl  returns double,
  66.                   INIStr returns string.  (read-only)
  67.     obj.Value     Sets or  returns the  value for the  INI  file,
  68.                   section, and key that  were set in the Register
  69.                   method.   The data  type is  determined  by the
  70.                   object type.  Ex: INIInt is integer,  INILng is
  71.                   long.  This  property will  return the  default
  72.                   value if  the specified  file, section, or  key
  73.                   cannot be found.
  74.     obj.Version   Returns the version number of the object.   The
  75.                   return data type is string.  (read-only)
  76.  
  77. =================================================================
  78. The INI File OLE Server DLL  traps and throws the  follwing error
  79. conditions:
  80.  
  81.     Constant                      Value  Description
  82.     ----------------------------  -----  ------------------------
  83.     gknISErrInvalidSection        1001   This error  occurs if an
  84.                                          empty string is provided
  85.                                          for the  section  in the
  86.                                          Register method.
  87.     gknISErrInvalidKey            1002   This error  occurs if an
  88.                                          empty string is provided
  89.                                          for the  key in Register
  90.                                          method.
  91.     gknISErrINIBaseNotRegistered  1003   This error occurs if any
  92.                                          of the properties except
  93.                                          for Version are accessed
  94.                                          before  Register  method
  95.                                          is invoked.
  96.  
  97. Per Microsoft recomendation the returned error values will be the
  98. value shown in  the table  above plus the vbObjectError  constant
  99. from Visual Basic.
  100.  
  101. These constants are defined in the IniConst.bas file.
  102.  
  103. =================================================================
  104. Examples:
  105.  
  106.     Before using an  INI  file object  you must first  create the
  107.     object.  An example is shown below.
  108.         
  109.         Private moINIStr As New IniFileServer.INIStr
  110.  
  111.     Now that you have an object variable defined you must use the
  112.     Register  method to  initialize it  to a  specific  ini file,
  113.     section and key.
  114.     
  115.         moINIStr.Register sSection, sKey, sDefault, sFile
  116.  
  117.         Note:  The Register  method  also has a 5th  parameter of
  118.                type boolean.  If  TRUE  this parameter forces the
  119.                value to be obtained from the  INI  file each time
  120.                the Value property is read.  If FALSE the value is
  121.                read from  the INI file  only the  first time  the
  122.                Value  property is  read.   The default  for  this
  123.                parameter is FALSE.
  124.         Note:  The Register  method can be called  multiple times
  125.                on the same object.   This procedure reinitializes
  126.                the existing INI file object and does not create a
  127.                new object.
  128.                
  129.     Now that you have  registered the  object you can  access the
  130.     other methods and properties as required.
  131.     
  132.         sValue = moINIStr.Value     'Get value  of the  specified
  133.                                     'key.
  134.         moINIStr.Value = sValue     'Set value  of the  specified
  135.                                     'key.
  136.         
  137.         sFile = moINIStr.File       'Get the registered file path
  138.                                     'and name.
  139.         sSection = moINIStr.Section 'Get registered section name.
  140.         sKey = moINIStr.Key         'Get the registered key name.
  141.         sDefault = moINIStr.Default 'Get registered default value
  142.         sVersion = moINIStr.Version 'Get version  number  of  the
  143.                                     'object.
  144.         
  145.         moINIStr.RemoveSection      'Deletes  registered  section
  146.                                     'and all associated keys from
  147.                                     'the ini file.
  148.         moINIStr.RemoveKey          'Deletes  registered key from
  149.                                     'the ini file.
  150.  
  151. =================================================================
  152. Technical Support:
  153.  
  154. You can contact Galaxy Software for technical support,  questions
  155. or comments by any of the following methods:
  156.  
  157.     Snail Mail:         Galaxy Software
  158.                         7044 St. Joe Road
  159.                         Fort Wayne, IN  46835
  160.                     
  161.     E-Mail:
  162.         Internet:       galaxysoft@msn.com
  163.         AOL:            GalaxySoft
  164.         MSN:            GalaxySoft
  165.         Compuserve:     102167,2656
  166.         
  167.     World Wide Web:     http://users.aol.com/galaxysoft/
  168.     
  169. =================================================================
  170. Legal stuff:
  171.  
  172. The  Galaxy  Software  INI  File  OLE  Server  DLL is copyrighted
  173. SHAREWARE.  This is not freeware and cannot be redistributed as a
  174. component of your projects until you have registered the product.
  175. You are free to evaluate this  product for 30 days after which if
  176. you intend to continue using it you will be required to register.
  177. You are free to  distribute this product  to other developers for
  178. evaluation purposes only and only if the entire package is intact
  179. as when it was received by you.  Please refer to register.txt for
  180. information on registering this product.
  181.  
  182. Copyright ⌐ 1996 - Galaxy Software
  183.